Trees | Indices | Toggle frames |
---|
event.EventDispatcher --+ | AbstractDocument
Abstract document interface used by all pyglet.text classes.
This class can be overridden to interface pyglet with a third-party document format. It may be easier to implement the document format in terms of one of the supplied concrete classes FormattedDocument or UnformattedDocument.
on_insert_text(self,
start,
text)
Text was inserted into the document.
|
|
on_delete_text(self,
start,
end)
Text was deleted from the document.
|
|
on_style_text(self,
start,
end,
attributes)
Text character style was modified.
|
__init__(self,
text='
' )
|
|
int |
get_paragraph_start(self,
pos)
Get the starting position of a paragraph.
|
int |
get_paragraph_end(self,
pos)
Get the end position of a paragraph.
|
AbstractRunIterator |
get_style_runs(self,
attribute)
Get a style iterator over the given style attribute.
|
get_style(self,
attribute,
position=0)
Get an attribute style at the given position.
|
|
get_style_range(self,
attribute,
start,
end)
Get an attribute style over the given range.
|
|
AbstractRunIterator |
get_font_runs(self,
dpi=None)
Get a style iterator over the pyglet.font.Font instances used in
the document.
|
pyglet.font.Font |
get_font(self,
position,
dpi=None)
Get the font instance used at the given position.
|
insert_text(self,
start,
text,
attributes=None)
Insert text into the document.
|
|
delete_text(self,
start,
end)
Delete text from the document.
|
|
insert_element(self,
position,
element,
attributes=None)
Insert a element into the document.
|
|
InlineElement |
get_element(self,
position)
Get the element at a specified position.
|
set_style(self,
start,
end,
attributes)
Set text style of some or all of the document.
|
|
set_paragraph_style(self,
start,
end,
attributes)
Set the style for a range of paragraphs.
|
|
dispatch_event(self,
event_type,
*args)
Dispatch a single event to the attached handlers.
(Inherited from pyglet.event.EventDispatcher)
|
|
event(self,
*args)
Function decorator for an event handler.
(Inherited from pyglet.event.EventDispatcher)
|
|
pop_handlers(self)
Pop the top level of event handlers off the stack.
(Inherited from pyglet.event.EventDispatcher)
|
|
push_handlers(self,
*args,
**kwargs)
Push a level onto the top of the handler stack, then attach zero or
more event handlers.
(Inherited from pyglet.event.EventDispatcher)
|
|
register_event_type(cls,
name)
Register an event type with the dispatcher.
(Inherited from pyglet.event.EventDispatcher)
|
|
remove_handler(self,
name,
handler)
Remove a single event handler.
(Inherited from pyglet.event.EventDispatcher)
|
|
remove_handlers(self,
*args,
**kwargs)
Remove event handlers from the event stack.
(Inherited from pyglet.event.EventDispatcher)
|
|
set_handler(self,
name,
handler)
Attach a single event handler.
(Inherited from pyglet.event.EventDispatcher)
|
|
set_handlers(self,
*args,
**kwargs)
Attach one or more event handlers to the top level of the handler
stack.
(Inherited from pyglet.event.EventDispatcher)
|
str |
text
Document text.
|
event_types =
|
Get an attribute style over the given range.
If the style varies over the range, STYLE_INDETERMINATE is returned.
Get a style iterator over the pyglet.font.Font instances used in the document.
The font instances are created on-demand by inspection of the font_name, font_size, bold and italic style attributes.
See Also: get_font_runs
Insert a element into the document.
See the InlineElement class documentation for details of usage.
Set the style for a range of paragraphs.
This is a convenience method for set_style that aligns the character range to the enclosing paragraph(s).
Document text.
For efficient incremental updates, use the insert_text and delete_text methods instead of replacing this property.
|
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Thu Dec 31 17:58:19 2009 | http://epydoc.sourceforge.net |